<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>7-案例-五彩导航条</title>
    <style>
        *{
            margin: 0;
            padding: 0;
            font-family: 'Micorsoft yahei';
        }
        div.box{
            width: 1200px;
            margin: 30px auto;
        }
        div.box >a{
            width: 120px;
            height: 58px;
            line-height:52px;
            /* 需要将它转成行内块 */
            display: inline-block;
            text-align: center;
            color: #fff;
            font-size: 15px;
            text-decoration: none;
        }
        div.box a.one{
            background: url(images/bg1.png);
        }
        div.box a.one:hover{
            background: url(images/bg5.png);
        }
        div.box a.two{
            background: url(images/bg2.png);
        }
        div.box a.two:hover{
            background: url(images/bg6.png);
        }
        div.box a.three{
            background: url(images/bg3.png);
        }
        div.box a.three:hover{
            background: url(images/bg7.png);
        }
        div.box a.four{
            background: url(images/bg4.png);
        }
        div.box a.four:hover{
            background: url(images/bg8.png);
        }
    </style>
</head>
<body>
    <div class="box">
        <a href="" class="one">孙悟空</a>
        <a href="" class="two">猪八戒</a>
        <a href="" class="three">金蝉</a>
        <a href="" class="four">孙尚香</a>
    </div>
</body>
</html>